﻿<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>@yield('title')</title>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
	<link rel="stylesheet" type="text/css" href="{{asset('resources/views/home/css/style.css')}}">
	<link rel="stylesheet" type="text/css" href="/resources/assets/bootstrap/css/bootstrap.min.css">
	<link rel="stylesheet" type="text/css" href="/resources/assets/css/index.css">
        <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->			
<script type="text/javascript" src="/resources/assets/js/jquery-1.12.0.min.js"></script>
<script type="text/javascript" src="/resources/assets/bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="/resources/assets/js/jquery.animateNumber.min.js"></script>
<script type="text/javascript" src="/resources/assets/js/jquery.touchSlider.js"></script>
<script type="text/javascript" src="/resources/assets/js/jquery.SuperSlide.2.1.1.js"></script>
<script type="text/javascript" src="/resources/assets/layer/layer.js"></script>
	<script type="text/javascript" src="{{asset('resources/views/home/js/script.js')}}"></script>
	@yield('addstyle')
</head>
<body>
<!--header begin-->
	<div class="header">
	    <div class="container">
	     	<div class="row">
	     		<div class="col-md-6">
	     			<ul class="header-left clearfix">
	     				<li class="kefu">
	     					<span class="kfspan"></span>
	     					<a href="http://wpa.b.qq.com/cgi/wpa.php?ln=1&key=" target="_blank" rel="nofollow">
	     						在线客服
	     					</a>
	     				</li>
	     				<li class="weixin">
	     					<span class="wxspan"></span>
	     					<span>关注我们</span>
	     					<img src="/resources/views/home/images/weixin.png" width="120" height="120" class="img-rounded" />
	     				</li>

	     			</ul>
	     		</div>
	     		<div class="col-md-6 clearfix">
	     			<ul class="header-right pull-right">
				@if(session('users'))
				@if(session('users')->admin!='0')
				<li><a href="{{url('admin/index')}}" target="_blank">后台管理</a></li>
				@else
				<li><a href="{{url('admin/index')}}" target="_blank">个人中心</a></li>
				@endif
				<li><a href="{{url('quit')}}">退出登录</a></li>
				@else
				<li><a href="{{url('admin/index')}}" target="_blank">欢迎登录</a></li>
				<li><a href="{{url('admin/register')}}" target="_blank">免费注册</a></li>
				@endif
	     			</ul>
	     		</div>
	     	</div>

	    </div>
	</div>
	<!--header end-->

	<!--nav begin-->
	<div class="container pt30 pb30 mt40">
		<div class="row">
			<div class="col-md-12">
				<div class="logo-con">
                    <a href="/"><img style="width: 210px;" src="/resources/views/home/images/mainlogo.png" alt=""/></a>
				</div>
				<div class="header-phone-con clearfix">
			<form action="{{url('search')}}" method="post" class="search fr">
				{{csrf_field()}}
				<select id="select" name="select" id="selectid">
					<option>全站</option>
					<option>科技成果</option>
					<option>科技需求</option>
					<option>科技孵化</option>
					<option>科技专家库</option>
				</select>
				<input type="text" name="search" value="@if(isset($search)) {{$search}} @endif">
				<input type="submit" value="搜索">
			</form>
				</div>
			</div>
		</div>
	</div>
	<div style="border-bottom: 3px solid #c7161c;width:100%;">
	<div class="container">
		<div class="row">
			<div class="col-md-12">
				<div class="clearfix">
					<div class="menu-con">
						<div class="menu-title">
							金汇智谷
						</div>
					</div>
					<div class="nav-con">
						<ul class="clearfix">
			<li><a href="{{url('fruit')}}">科技成果</a></li>
			<li><a href="{{url('need')}}">科技需求</a></li>
			<li class="showTwo">
				<a href="javascript:;">科技孵化</a>
                <ul class="menu-content">
					<li><a href="{{url('assess')}}">科技评估</a></li>
					<li><a href="{{url('bank')}}">科技金融</a></li>
					<li><a href="{{url('hatch')}}">孵化中心</a></li>
				</ul>
			</li>
			<li><a href="{{url('laboratory')}}">共建实验室</a></li>
			<li><a href="{{url('expert')}}">科技专家库</a></li>
			<li><a href="#" onclick="alert('暂未对外开放');">国际科技馆</a></li>
			<li class="showTwo">
				<a href="javascript:;">科技导航</a>
				<ul class="menu-content">
					<li><a href="{{url('link')}}">政策导航</a></li>
					<li><a href="{{url('videos')}}">科技大讲堂</a></li>
				</ul>
			</li>			
            </ul>
					</div>

				</div>
			</div>
		</div>
	</div>
	</div>
	<!--nav end-->
	
	<div id="maincontent">
		@yield('content')
	</div>

	<!--footer begin-->
<div class="footer">	
	<div class="container">
		<div class="row">
			<div class="col-md-2">
				<dl>
					<dt>关于我们</dt>
					<dd><a href="" rel="nofollow">金汇智介绍</a></dd>
					<dd><a href="" rel="nofollow">全国分站</a></dd>
					<dd><a href="" rel="nofollow">联系我们</a></dd>
				</dl>
			</div>
			<div class="col-md-2">
				<dl>
					<dt>对接服务</dt>
					<dd><a href="">业务流程</a></dd>
					<dd><a href="">保障体系</a></dd>
					<dd><a href="">合伙人</a></dd>
				</dl>
			</div>
            <div class="col-md-2">
				<dl>
					<dt>了解更多</dt>
					<dd><a href="" rel="nofollow">常见问题</a></dd>
					<dd><a href="" rel="nofollow">友情链接</a></dd>
					<dd><a href="" rel="nofollow">版权协议</a></dd>
				</dl>
			</div>
			<div class="col-md-3">
				<dl class="ewm center-block">	
					<dd>
						<ul>
							<li>
								<img src="/resources/views/home/images/weixin.png" class="img-rounded" width="90" height="90"/>
								<div>关注微信</div>
							</li>
						</ul>
					</dd>
				</dl>
			</div>
			<div class="col-md-3">
				<div style="margin-top:-20px" class="text-right">
					<h2 class="text-muted"><span class="glyphicon glyphicon-phone-alt"></span> <strong>021-54336693</strong></h2>
					<span class="text-muted">7X24小时客服热线/企业QQ</span><br/>
					<a href="http://wpa.b.qq.com/cgi/wpa.php?ln=1&key=" target="_blank" type="button" class="btn btn-danger mt10"><span class="glyphicon glyphicon-comment" aria-hidden="true"></span> 在线客服</a>
				</div>
			</div>
		</div>
		<hr/>
		<div class="row mt20">
			
			<div class="col-md-12">
				<div class="beian text-center">版权所有&copy; 金汇智谷
</div>
        
		</div>	
	</div>	
</div>	
	<!--footer end-->	

	<script type="text/javascript">
	$(function(){

		$('.showTwo').on('mouseover',function(){
			$(this).children('ul').show();
			$('.showTwo').on('mouseout',function(){
				$(this).children('ul').hide();
				
			});
		});

	});
	</script>

<!--注册弹出框-->
<div class="modal fade" id="registerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">请填写注册信息</h4>
      </div>
		<div class="modal-body">
		  
          <!--使用手机号注册  begin-->
			<div class="xw_register" id="phone_register">
				<form class="form-inline" id="form1">
					<div class="input-group">
						<div class="input-group-addon"><span class="glyphicon glyphicon-phone"></span></div>
						<input type="text" class="form-control span2" id="username" name="mobile" type="text" placeholder="手机号">
					</div>
					<div class="input-group mt20">
						<div id="r_captcha"></div>
					</div>
					<div class="input-group mt20 mb30">
						<div class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></div>
						<input type="text" class="form-control span2" id="yanzhengma" type="text" placeholder="短信验证码">

					</div>
					<span class="btn btn-default ml10 btn-radius" id="duanxin"> 获取验证码</span>
					<div class="input-group">
					<a class="btn btn-danger" id="wx_register_next" data-url="">下一步</a><a href="javascript:;" id="qudenglu" class="ml20">已有账号>></a>
					<input type="hidden" name="type" value="register" />
					</div>
				</form>
			</div>
          <!--使用手机号注册  end-->
          <!--输入密码  begin-->
			<div class="xw_register" style="display:none;" id="email_register">
				<form>
					<div class="input-group input-group mb10">
						<div class="input-group-addon"><span class="glyphicon glyphicon-asterisk"></span></div>
						<input type="text" class="form-control span2" id="password" type="password" name="password" placeholder="密码">
					</div>
					
					<div class="input-group input-group mb20">
						<div class="input-group-addon"><span class="glyphicon glyphicon-asterisk"></span></div>
						<input type="text" class="form-control span2" id="repassword" name="repassword" type="password" placeholder="再次输入密码">
					</div>
					<a class="btn btn-danger center-block" id="wx_register_btn" data-url="" style="width:100px;">确定</a>
				</form>
			</div>
          <!--输入密码  end-->
		
      </div>
    </div>
  </div>
</div>
<!-- 引入极验验证码 -->
<script src="http://static.geetest.com/static/tools/gt.js"></script>
<script>
var product = "embed";
function get_captcha(parm){
	var handler = function (captchaObj) {
		// 将验证码加到id为captcha的元素里
		captchaObj.appendTo(parm);
		//	验证成功回调
		captchaObj.onSuccess(function(){
			//captchaObj.refresh();
		});
		//	验证失败回调
		captchaObj.onFail(function(){
			captchaObj.refresh();
		});
		//	点击刷新回调
		captchaObj.onRefresh(function(){
			
		});
		//	加载验证码之后回调
		captchaObj.onReady(function(){
			$('.gt_help_button').remove();
			$('.gt_logo_button').remove();
		})
		var a = captchaObj.getValidate();
	};

	$.ajax({
		// 获取id，challenge，success（是否启用failback）
		url: "/captcha/get_captcha/rand/"+Math.round(Math.random()*100),
		type: "get",
		dataType: "json", // 使用jsonp格式
		success: function (data){
			// 使用initGeetest接口
			// 参数1：配置参数，与创建Geetest实例时接受的参数一致
			// 参数2：回调，回调的第一个参数验证码对象，之后可以使用它做appendTo之类的事件
			initGeetest({
				gt: data.gt,
				challenge: data.challenge,
				product: product, // 产品形式
				offline: !data.success
				//更多前端参数配置 http://www.geetest.com/install/sections/idx-client-sdk.html#config-para
			}, handler);
		}
	});
}
</script>

<script type="text/javascript">
get_captcha("#r_captcha");
var sendsms = true;
var wait = 60;
// $('#register_div').hide();
    $('#register_check_verify').click(function () {
        var val = $('#register_verify').val();
        if (val.length == 4) {
            $.post("/Index/Public/check_verify.html", {
                    val: val
                }, function(data) {
                    if (data.status == 1) {
                        // 
                        $('#register_div').show();
                        layer.msg(data.info, {
                                icon: 6
                            });
                    } else{
                        $('.reloadverify').click();
                        layer.msg(data.info, {
                                icon: 5
                            });
                    }
                });
        } else{
            layer.msg('请输入 4 位验证码', { icon: 5 });
        };
    });
$("#wx_register_next").click(function(){
    var username=$('#username').val();
    var code=$('#yanzhengma').val();
    var type="register";
    if(username==''){
        layer.msg('请输入您的手机号码',{icon: 5});
        return false;
    }
    layer.load(1);
    var reg = /^0?1[3|4|5|8][0-9]\d{8}$/;
    var zhuangtai;
    if(reg.test(username)){
        $.ajax({
            type:"POST",
            url:"/Home/Public/check_mobile.html",
            async: false,
            dataType: "json",
            data:{mobile:username},
            success:function(data){
                layer.closeAll('loading');
                if(data=='false'){
                    layer.msg('该手机已被注册',{icon: 5});
                    zhuangtai='1';
                }
            }
        })
        if(zhuangtai=='1'){
            return false;
        }
        $.post("/Home/Public/check_code.html",{code:code,type:type},function(data){
            layer.closeAll('loading');
            if(data=='true'){
                $("#phone_register").hide();
               $("#email_register").show();
           }else{
               layer.msg('请输入正确的验证码',{icon: 5});
           }
        })
    }else{
        layer.closeAll('loading');
        layer.msg('请输入正确的手机号码',{icon: 5});
        return false;
    }
})
$('#wx_register_btn').click(function(){
    var username=$('#username').val();
    var password=$('#password').val();
    var repassword=$('#repassword').val();
    if(password==''){
        layer.msg('请输入密码',{icon: 5});
        return false;
    }
    if(password!=repassword){
        layer.msg('密码和重复密码不一致',{icon: 5});                
        return false;
    }
    layer.load(1);
    $.post("/Home/Public/register.html",{username:username,password:password,repassword:repassword},function(data){
        layer.closeAll('loading');
        if(data.status=='1'){
            layer.msg(data.info,{icon: 6});
            setTimeout(window.location.reload(),3000);
        }else{
            layer.msg(data.info,{icon: 5});
        }
    },'json')
})
$('#duanxin').click(function(){
    var mobile=$('#username').val();
    var code=$('#register_verify').val();
	var sub_data = $('#form1').serialize();
    /*
	if (code.length !== 4) {
      layer.msg('请输入 4 位验证码', { icon: 5 });
      return false;
    }
	*/
    var hide=$('#isCodeVerify').val();
    var type="register";
    var reg = /^0?1[3|4|5|8][0-9]\d{8}$/;
    var zhuangtai;
  if (reg.test(mobile)) {
		$.ajax({
            type:"POST",
            url:"/Home/Public/check_mobile.html",
            async: false,
            dataType: "json",
            data:{mobile:mobile},
            success:function(data){
                layer.closeAll('loading');
                if(data=='false'){
                    layer.msg('该手机已被注册',{icon: 5});
                    zhuangtai='1';
                }
            }
        })
		if(zhuangtai=='1'){
			return false;
		}
		if(sendsms){  
			layer.load(1);
			$.post("/Home/Public/get_code.html",sub_data,function(data){
				layer.closeAll('loading');
				if (data.status == 1) {
					layer.msg('验证码已发送',{icon: 6});
					time($('#duanxin'));
					return true;
				} else{
					$('.reloadverify').click();
					layer.msg(data.info, {
						icon: 5
					});
					return false;
				}
			})
		}
  }else{
    layer.msg('请输入正确的手机号码',{icon: 5});
    return false;
  }
})
$('#qudenglu').click(function(){        
    $('#registerModal').modal('hide');
    $('#loginModal').modal('show');
});

function time(o) {
    if (wait == 0) {  
        sendsms=true;
        o.removeAttr("disabled");            
        o.html("获取验证码");  
        wait = 60;  
    } else { 
        sendsms=false; 
        o.attr("disabled", true);
        o.html("重新发送(" + wait + ")");
        wait--;
        setTimeout(function() {
              time(o);
          }, 1000);
    }
}
    
</script>
     <!--登录弹出框-->
<div class="modal fade" id="loginModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
  <div class="modal-dialog" role="document">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
        <h4 class="modal-title" id="myModalLabel">请填写登录信息</h4>
      </div>
      <div class="modal-body">
	  <div class="row">
	  <div class="col-md-6"><!--<img src="/resources/assets/images/login.png">-->
		<iframe src="/Wap/WxLogin/login.html" width="300" height="350" frameborder="0" scrolling="no"> 
		</iframe> 

	  </div>
	  <div class="col-md-6">
          <div class="xw_login">
			<div class="title" style="text-align:center;margin:20px 0 20px 0;font-size:20px;">帐号密码登陆</div>
             <form class="form-inline">
                  
                   <div class="input-group mt20">
								      <div class="input-group-addon"><span class="glyphicon glyphicon-phone"></span></div>
								      <input class="form-control span2 input-lg" id="login_username" type="text" name="username" placeholder="请输入手机号">
								    </div>
								    
                  <div class="input-group mt10 mb10">
								      <div class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></div>
								      <input class="form-control span2 input-lg" id="login_password" type="password" name="password" placeholder="密码">
								    </div>
                                                                                            
                    <div class="control-group hide" id="verify_k">                     <div class="controls">
                         <div class="input-prepend">
                              <span class="add-on"><i class="icon-qrcode"></i></span>
                              <input class="span1"  type="text" name="verify" id="verify" placeholder="验证码" >
                              <span><img class="verifyimg reloadverify" alt="点击切换" src="/Home/Public/verify.html" style="cursor:pointer;height:40px"></span>
                        </div>
                   </div>
                </div>
				<div class="control-group mb20 text-right">
					<label class="checkbox">
					 <a href="javascript:;" class="ml10 fgrey1" id="forgetpass">忘记密码？</a>
					</label>
				</div>
				<div class="control-group mb20 text-center">
                <a class="btn btn-danger" id="wx_login_btn" url="/Home/Public/login.html" >立即登录</a>
                <a class="btn btn-default ml20" href="javascript:;" id="qiehuan">免费注册</a>
				</div>
             </form>
        </div> 
      </div>
	  </div>
	  
	  </div>
    </div>
  </div>
</div>
     
<input type="hidden" id="yanzhengdizhi" value="/Home/Public/islogin.html">

<script type="text/javascript">
$(function(){
    $("#loginModal").keydown(function(event){
        if (event.keyCode==13){
          $('#wx_login_btn').click();
      }
    });
    $('#wx_login_btn').click(function(){
        var username=$("#login_username").val();
        var password=$("#login_password").val();
        var verify=$("#verify").val();
        layer.load(1);
        $.post("/Home/Public/login.html",{username:username,password:password,verify:verify},function(data){
            layer.closeAll('loading');
            if(data.status==1){
                window.location.reload();
            }else{
                layer.msg(data.info,{icon: 5});
                $(".reloadverify").click();
                
                if(data.info=='验证码输入错误！'){
                    $('#verify').val('');
                    $('#verify').focus();
                }else{
                    $('#login_password').val('');
                    $('#login_password').focus();
                    $('#verify').val('');
                }
                if(data.errorcount>3 || data.errorcount==3){
                    $('#verify_k').removeClass('hide');
                }
            }
        },"json")
    })
    $('#qiehuan').click(function(){        
            $('#loginModal').modal('hide');
            $('#registerModal').modal('show');
			//get_captcha();
    })
    $('#forgetpass').click(function(){
        $('#loginModal').modal('hide');
            $('#forgetModal').modal('show');
    })
    var verifyimg = $(".verifyimg").attr("src");
     $(".reloadverify").click(function(){
        if( verifyimg.indexOf('?')>0){
            $(".verifyimg").attr("src", verifyimg+'&random='+Math.random());
        }else{
            $(".verifyimg").attr("src", verifyimg.replace(/\?.*$/,'')+'?'+Math.random());
        }
    });
});
</script>

</div>



<div class="modal fade" id="forgetModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
	<div class="modal-dialog" role="document">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<h4 class="modal-title" id="myModalLabel">请填写您的信息</h4>
			</div>
			<div class="modal-body">
             
			<!--手机获取短信验证码--> 
			<div class="xw_register" id="phone_forget">
				<form class="form-inline" id="p_forget">
					<div class="input-group ">
						<div class="input-group-addon"><span class="glyphicon glyphicon-phone"></span></div>
						<input type="text" class="form-control span2" id="forget_phone" name="mobile" type="text" placeholder="手机号">
					</div>
					<!-- 
					<div class="input-group mt10">
						<div class="input-group-addon"><span class="glyphicon glyphicon-phone"></span></div>
						<input type="text" class="form-control span2" name="verify" id="forget_verify" placeholder="验证码">
					</div> 
					<img class="verifyimg reloadverify" alt="点击切换" src="/Public/verify.html">
					 -->
					<div class="input-group mt20">
						<div id="f_captcha" ></div>
					</div>
					<input type="hidden" name="type" value="forget">
					<div class="input-group mt20">
						<div class="input-group-addon"><span class="glyphicon glyphicon-envelope"></span></div>
						<input type="text" class="form-control span2" id="forget_code" type="text" placeholder="短信验证码">
					</div>
					<span class="btn btn-default" id="forget_duanxin"> 获取验证码</span>
					<div class="mt10">
						<a class="btn btn-danger" id="forget_next" data-url="">下一步</a>
					</div>
                </form>
             
			</div>
          <!--忘记密码-->   
           <div class="xw_register" style="display:none;" id="forget_2">
             
			 <form>
					<div class="input-group input-group mb10">
						<div class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></div>
						<input type="password" class="form-control span2" id="newpassword" name="newpassword" placeholder="请输入新密码">
					</div>
					
					<div class="input-group input-group mb20">
						<div class="input-group-addon"><span class="glyphicon glyphicon-lock"></span></div>
						<input type="password" class="form-control span2" id="newrepassword" name="newrepassword" placeholder="再次输入新密码">
					</div>
					<a class="btn btn-danger center-block" id="wx_forget_btn" data-url="" style="width:100px;">确定</a>
				</form>
			 
			 
			 
        </div>
           
           
           
           
             
      </div>
    </div>
  </div>
</div>
<script type="text/javascript">
	get_captcha("#f_captcha");
    // $('#forget_div').hide();
    $('#forget_check_verify').click(function () {
        var val = $('#forget_verify').val();
        if (val.length == 4) {
            $.post("/Index/Public/check_verify.html", {
                    val: val
                }, function(data) {
                    if (data.status == 1) {
                        // 
                        $('#forget_div').show();
                        layer.msg(data.info, {
                                icon: 6
                            });
                    } else{
                        $('.reloadverify').click();
                        layer.msg(data.info, {
                                icon: 5
                            });
                    }
                });
        } else{
            layer.msg('请输入 4 位验证码', { icon: 5 });
        };
    });
    
function forget_check_verify(){
  var val = $('#forget_verify').val();
  if (val.length == 4) {
      $.post("/Index/Public/check_verify.html", {
              val: val
          }, function(data) {
              if (data.status == 1) {
                  return true;
              } else{
                  $('.reloadverify').click();
                  layer.msg(data.info, {
                      icon: 5
                  });
                  return false;
              }
          });
  } else{
      layer.msg('请输入 4 位验证码', { icon: 5 });
  }
}
function forget_time(o){  
    if (wait == 0) {  
        sendsms=true;
        o.removeAttr("disabled");            
        o.html("获取验证码");  
        wait = 60;  
    } else { 
        sendsms=false; 
        o.attr("disabled", true);
        o.html("重新发送(" + wait + ")");  
        wait--;  
        setTimeout(function() {
            forget_time(o)  
        },  
        1000)  
    }  
}
$('#forget_duanxin').click(function(){
    var mobile=$('#forget_phone').val();
	/*
	var code=$('#forget_verify').val();
	if (code.length !== 4) {
      layer.msg('请输入 4 位验证码', { icon: 5 });
      return false;
    }
	*/
    var hide=$('#isCodeVerify').val();
    var type="forget";
	var reg = /^0?1[3|4|5|8][0-9]\d{8}$/;
	var zhuangtai;
	if (reg.test(mobile)) {
		if(sendsms){
			layer.load(1);
			$.ajax({
				type:"POST",
				url:"/Home/Public/check_mobile.html",
				async: false,
				dataType: "json",
				data:{mobile:mobile},
				success:function(data){
					layer.closeAll('loading');
					if(data=='true'){
						layer.msg('该用户不存在',{icon: 5});
						zhuangtai='1';
					}
				}
			});
			if(zhuangtai=='1'){
				return false;
			}
			var sub_data = $('#p_forget').serialize();
			$.post("/Home/Public/get_code.html",sub_data,function(data){
				layer.closeAll('loading');
				if (data.status == 1) {
					layer.msg('验证码已发送',{icon: 6});
					forget_time($('#forget_duanxin'));
					return true;
				} else{
					$('.reloadverify').click();
					layer.msg(data.info, {
						icon: 5
					});
					return false;
				}
			});
		}
	}else{
		layer.msg('请输入正确的手机号码',{icon: 5});
		return false;
	}
})
$("#forget_next").click(function(){
    var forget_phone=$('#forget_phone').val();
    var code=$('#forget_code').val();
    var type="forget";
    if(forget_phone==''){
        layer.msg('请输入您的手机号码',{icon: 5});
        return false;
    }
    layer.load(1);
    var reg = /^0?1[3|4|5|8][0-9]\d{8}$/;
    var zhuangtai;
    if(reg.test(forget_phone)){
        $.ajax({
            type:"POST",
            url:"/Home/Public/check_mobile.html",
            async: false,
            dataType: "json",
            data:{mobile:forget_phone},
            success:function(data){
                layer.closeAll('loading');
                if(data=='true'){
                    layer.msg('该用户不存在',{icon: 5});
                    zhuangtai='1';
                }
            }
        })
        if(zhuangtai=='1'){
            return false;
        }
        $.post("/Home/Public/check_code.html",{code:code,type:type},function(data){
            layer.closeAll('loading');
            if(data=='true'){
                $("#phone_forget").hide();
               $("#forget_2").show();
           }else{
               layer.msg('请输入正确的验证码',{icon: 5});
           }
        })
        
    }else{
        layer.closeAll('loading');
        layer.msg('请输入正确的手机号码',{icon: 5});
        return false;
    }
})

$('#wx_forget_btn').click(function(){
    var username=$('#forget_phone').val();
    var password=$('#newpassword').val();
    var repassword=$('#newrepassword').val();
    if(password==''){
        layer.msg('请输入密码',{icon: 5});
        return false;
    }
    if(password!=repassword){
        layer.msg('密码和重复密码不一致',{icon: 5});                
        return false;
    }
    layer.load(1);
    $.post("/Home/Public/updatepassword.html",{username:username,password:password,repassword:repassword},function(data){
         layer.closeAll('loading');
        if(data.status=='1'){
            layer.msg(data.info,{icon: 6});                    
             $('#forget_phone').val('');
             $('#newpassword').val('');
             $('#newrepassword').val('');
             $("#forget_2").hide();
             $("#phone_forget").show();
             $('#forgetModal').modal('hide');
             $('#loginModal').modal('show');
        }else{
            layer.msg(data.info,{icon: 5});
        }
    },'json')
});

// 退出登录
function tiaozhuan(){
    window.location.href="/Index/index.html";
}
$("#logout").click(function(){
    layer.confirm('你确定要退出么？', {icon: 3}, function(index){
      layer.close(index);
      $.post("/Home/Public/logout.html",{},function(data){
          if(data.status=='1'){
              layer.msg(data.info,{icon: 6});
          }
          setTimeout("tiaozhuan()", 2000);
      });
  });
});

</script>

<script>
/**
 *	点击btn 判断用户是否登录
 */
$('a').click(function(){
	if($(this).hasClass('is_login')){
		var href= $(this).attr('href');
		if(href){
			var h = href.match(".html");
			if(href !="#" && href !="javascript:;" && h){
				var aa = "0";
				if(aa == 0){
					$('#loginModal').modal('show');
					return false;
				}			
			}
		}
	}
})

</script>

<script type="text/javascript" src="/resources/assets/js/index.js"></script>
 
		<script type="text/javascript">
			$(".main_visual").hover(function(){

        $("#btn_prev,#btn_next").fadeIn()

        },function(){
 
        $("#btn_prev,#btn_next").fadeOut()

        })

    $dragBln = false;

    $(".main_image").touchSlider({

        flexible : true,

        speed : 200,

        btn_prev : $("#btn_prev"),

        btn_next : $("#btn_next"),

        paging : $(".flicking_con a"),

        counter : function (e) {

            $(".flicking_con a").removeClass("on").eq(e.current-1).addClass("on");

        }

    });

    $(".main_image").bind("mousedown", function() {

        $dragBln = false;

    })

    $(".main_image").bind("dragstart", function() {

        $dragBln = true;

    })

    $(".main_image a").click(function() {

        if($dragBln) {

            return false;

        }

    })

    timer = setInterval(function() { $("#btn_next").click();}, 5000);

    $(".main_visual").hover(function() {

        clearInterval(timer);

    }, function() {

        timer = setInterval(function() { $("#btn_next").click();}, 5000);

    })

    $(".main_image").bind("touchstart", function() {

        clearInterval(timer);

    }).bind("touchend", function() {

        timer = setInterval(function() { $("#btn_next").click();}, 5000);

    })
		</script>
<script>
	
//图片轮播
/*var PCSatrt;
var picId = 0;
function heSaidPic(){	
	var li = document.getElementById("he-said-ul").getElementsByTagName("li");
	var liLength = li.length;
	if(picId==liLength)
	{
		picId=0;		
	}
	li[picId<0?0:picId].style.left = "-100%";
	li[picId<0?0:picId].style.zIndex = "-1";
	li[(picId+1)==liLength?0:picId+1].style.left = "0px";
	li[(picId+1)==liLength?0:picId+1].style.zIndex = "2";
	li[(picId-1)<0?liLength-1:picId-1].style.left = "100%";
	li[(picId-1)<0?liLength-1:picId-1].style.zIndex = "-1";
	picId++;
}

function lastHeSaidPic(){	
	var li = document.getElementById("he-said-ul").getElementsByTagName("li");
	var liLength = li.length;
	if(picId<0)
	{
		picId=liLength-1;
	}
	if(picId==liLength)
	{
		picId=0;		
	}
	li[picId].style.left = "100%";
	li[picId].style.zIndex = "-1";
	li[(picId+1)==liLength?0:picId+1].style.left = "-100%";
	li[(picId+1)==liLength?0:picId+1].style.zIndex = "-1";
	li[(picId-1)<0?liLength-1:picId-1].style.left = "0px";
	li[(picId-1)<0?liLength-1:picId-1].style.zIndex = "2";
	picId--;
}

//轮播启动函数
var sildeWaitTime = 3000;
var PCStart = setInterval(heSaidPic,sildeWaitTime);

function heSaidUp(){
	clearInterval(PCStart);
	lastHeSaidPic();
	PCStart = setInterval(heSaidPic,sildeWaitTime);
}

function heSaidDown(){
	clearInterval(PCStart);
	heSaidPic();
	PCStart = setInterval(heSaidPic,sildeWaitTime);
}
 */	
</script>
<script>
  /*  $(function(){
	   
			jQuery(".txtMarquee-top").slide({mainCell:".bd ul",autoPlay:true,effect:"topMarquee",vis:5,interTime:50});
		
    })*/
</script>
</body>
</html>
